package com.systex.sop.cvs.dto;

// Generated Jan 11, 2012 3:55:55 PM by Hibernate Tools 3.3.0.GA

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Tbsoptcvsver generated by hbm2java
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "TBSOPTCVSVER")
public class Tbsoptcvsver implements java.io.Serializable {

	private TbsoptcvsverId id;
	private Tbsoptcvsmap tbsoptcvsmap;
	private String author;
	private Timestamp verdate;
	private char state;
	private String fulldesc;
	private String descId;
	private String descDesc;
	private String descStep;
	private String creator;
	private Timestamp createtime;
	private String modifier;
	private Timestamp lastupdate;
	private Set<Tbsoptcvstag> tbsoptcvstags = new HashSet<Tbsoptcvstag>(0);

	public Tbsoptcvsver() {
	}

	public Tbsoptcvsver(TbsoptcvsverId id, Tbsoptcvsmap tbsoptcvsmap,
			String author, Timestamp verdate, char state) {
		this.id = id;
		this.tbsoptcvsmap = tbsoptcvsmap;
		this.author = author;
		this.verdate = verdate;
		this.state = state;
	}

	public Tbsoptcvsver(TbsoptcvsverId id, Tbsoptcvsmap tbsoptcvsmap,
			String author, Timestamp verdate, char state, String fulldesc,
			String descId, String descDesc, String descStep, String creator,
			Timestamp createtime, String modifier, Timestamp lastupdate,
			Set<Tbsoptcvstag> tbsoptcvstags) {
		this.id = id;
		this.tbsoptcvsmap = tbsoptcvsmap;
		this.author = author;
		this.verdate = verdate;
		this.state = state;
		this.fulldesc = fulldesc;
		this.descId = descId;
		this.descDesc = descDesc;
		this.descStep = descStep;
		this.creator = creator;
		this.createtime = createtime;
		this.modifier = modifier;
		this.lastupdate = lastupdate;
		this.tbsoptcvstags = tbsoptcvstags;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "MSid", column = @Column(name = "M_SID", nullable = false, precision = 10, scale = 0)),
			@AttributeOverride(name = "version", column = @Column(name = "VERSION", nullable = false, length = 20)) })
	public TbsoptcvsverId getId() {
		return this.id;
	}

	public void setId(TbsoptcvsverId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "M_SID", nullable = false, insertable = false, updatable = false)
	public Tbsoptcvsmap getTbsoptcvsmap() {
		return this.tbsoptcvsmap;
	}

	public void setTbsoptcvsmap(Tbsoptcvsmap tbsoptcvsmap) {
		this.tbsoptcvsmap = tbsoptcvsmap;
	}

	@Column(name = "AUTHOR", nullable = false, length = 50)
	public String getAuthor() {
		return this.author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "VERDATE", nullable = false)
	public Timestamp getVerdate() {
		return this.verdate;
	}

	public void setVerdate(Timestamp verdate) {
		this.verdate = verdate;
	}

	@Column(name = "STATE", nullable = false, length = 1)
	public char getState() {
		return this.state;
	}

	public void setState(char state) {
		this.state = state;
	}

	@Column(name = "FULLDESC", length = 4000)
	public String getFulldesc() {
		return this.fulldesc;
	}

	public void setFulldesc(String fulldesc) {
		this.fulldesc = fulldesc;
	}

	@Column(name = "DESC_ID", length = 50)
	public String getDescId() {
		return this.descId;
	}

	public void setDescId(String descId) {
		this.descId = descId;
	}

	@Column(name = "DESC_DESC", length = 3000)
	public String getDescDesc() {
		return this.descDesc;
	}

	public void setDescDesc(String descDesc) {
		this.descDesc = descDesc;
	}

	@Column(name = "DESC_STEP", length = 3000)
	public String getDescStep() {
		return this.descStep;
	}

	public void setDescStep(String descStep) {
		this.descStep = descStep;
	}

	@Column(name = "CREATOR", length = 50)
	public String getCreator() {
		return this.creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATETIME")
	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}

	@Column(name = "MODIFIER", length = 50)
	public String getModifier() {
		return this.modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LASTUPDATE")
	public Timestamp getLastupdate() {
		return this.lastupdate;
	}

	public void setLastupdate(Timestamp lastupdate) {
		this.lastupdate = lastupdate;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "tbsoptcvsver")
	public Set<Tbsoptcvstag> getTbsoptcvstags() {
		return this.tbsoptcvstags;
	}

	public void setTbsoptcvstags(Set<Tbsoptcvstag> tbsoptcvstags) {
		this.tbsoptcvstags = tbsoptcvstags;
	}

	@Override
	public String toString() {
		return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}
}
